package unit;

import java.util.ArrayList;

import main.*;
import equipment.*;

public class Orc extends Unit {
	public Equipment[] equipChoices = {new Axe2H(), new Spear(), new OrcBow(), new Shield()};
	
	public Orc(int id, int armyIndex, int x, int y) {
		this.strength = 3;
		this.defense = 4;
		this.attacks = 1;
		this.wounds = 1;
		this.courage = 2;
		this.fightValue = 3;
		this.shootValue = 5;
		this.initWorking();

		this.baseMove = 6.0;
		this.move = 6.0;
		this.moveLeft = 6.0;
		
		this.id = id;
		this.name = "Orc";
		this.race = "Orc";
		this.x = x;
		this.y = y;
		this.armyIndex = armyIndex;
	}
	
	public Orc clone() {
		Orc copy = new Orc(this.id, this.armyIndex, this.x, this.y);
		copy.strength = this.strength;
		copy.defense = this.defense;
		copy.attacks = this.attacks;
		copy.wounds = this.wounds;
		copy.courage = this.courage;
		copy.fightValue = this.fightValue;
		copy.shootValue = this.shootValue;
		
		copy.move = this.move;
		copy.moveLeft = this.moveLeft;
		copy.shootRange = this.shootRange;
		copy.shootStrength = this.shootStrength;
		copy.moveNeededToShoot = this.moveNeededToShoot;
		copy.hasShot = this.hasShot;
		
		copy.equipmentList = new ArrayList<Equipment>();
		for(Equipment e : this.equipmentList){
			copy.equipmentList.add(e);
		}
		
		copy.supporters = new ArrayList<Unit>();
		for(Unit u : this.supporters){
			copy.supporters.add(u);
		}
		
		copy.battle = this.battle;
		copy.game = this.game;
		
		return copy;
	}

	public Equipment[] getEquipChoices() {
		return this.equipChoices;
	}
}